{template '_header'}

<div class="page-heading"> <h2><i class="fa fa-circle-o"></i>分类层级设置</h2> </div>

    <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data" >
   
  
                <div class="form-group">
                    <label class="col-sm-2 control-label">分类级别</label>
                    <div class="col-sm-9 col-xs-12">
                        {ifp 'sysset.category.edit'}
                        <label class="radio-inline">
                            <input type="radio" name="data[level]" value="-1" {if $data['level']==-1}checked{/if} /> 无
                        </label>
	             <label class="radio-inline">
                            <input type="radio" name="data[level]" value="1" {if $data['level']==1}checked{/if} /> 一级
                        </label>
						
                        <label class="radio-inline">
                            <input type="radio" name="data[level]" value="2" {if $data['level']==2 || empty($data['level'])}checked{/if} /> 二级
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="data[level]" value="3" {if $data['level']==3}checked{/if}/> 三级
                        </label>
		  
						
                        {else}
                        <input type="hidden" name="data[level]" value="{$data['level']}" />
                        <div class='form-control-static'>
							{if $data['level']==-1}
							无分类
							{elseif $data['level']==1}
							一级
							{elseif $data['level']==2 || empty($data['level'])}
							二级
							{elseif $data['level']==3}
							三级
							{/if}</div>
                        {/if}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">显示形式</label>
                    <div class="col-sm-9 col-xs-12">
                        {ifp 'sysset.category.edit'}
                        <label class="radio-inline">
                            <input type="radio" name="data[show]" value="0" {if empty($data['show'])}checked{/if} /> 单页
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="data[show]" value="1" {if $data['show']==1}checked{/if}/> 多页
                        </label>
                        {else}
                        <input type="hidden" name="data[show]" value="{$data['show']}" />
                        <div class='form-control-static'>{if empty($data['show'])}单页{else}多页{/if}</div>
                        {/if}
                    </div> 
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">显示样式</label>
                    <div class="col-sm-9 col-xs-12">
                        {ifp 'sysset.category.edit'}
                        <label class="radio-inline">
                            <input type="radio" name="data[style]" value="0" {if empty($data['style'])}checked{/if} /> 圆形
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="data[style]" value="1" {if $data['style']==1}checked{/if}/> 方形
                        </label>
                        {else}
                        <input type="hidden" name="data[style]" value="{$data['style']}" />
                        <div class='form-control-static'>{if empty($data['style'])}圆形{style}方形{/if}</div>
                        {/if}
                    </div>
                </div>
              <div class="form-group">
                    <label class="col-sm-2 control-label">推荐分类广告</label>
                    <div class="col-sm-9 col-xs-12">
                        {ifp 'sysset.category.edit'}
                        {php echo tpl_form_field_image('data[advimg]', $data['advimg'])}
                        <span class='help-block'>分类页面中，推荐分类的广告图，建议尺寸640*320</span>
                        {else}
                        <input type="hidden" name="data[advimg]" value="{$data['advimg']}" />
                        {if !empty($data['advimg'])}
                        <a href='{php echo tomedia($data['advimg'])}' target='_blank'>
                           <img src="{php echo tomedia($data['advimg'])}" style='width:200px;border:1px solid #ccc;padding:1px' />
                        </a>
                        {/if}
                        {/if}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">推荐分类广告链接</label>
                    <div class="col-sm-9 col-xs-12">
                        {ifp 'sysset.category.edit'}
	                        <div class="input-group form-group">
								<input type="text" name="data[advurl]" class="form-control" value="{$data['advurl']}" id="advurl" />
								<span data-input="#advurl" data-toggle="selectUrl" class="input-group-addon btn btn-default">选择链接</span>
							</div>
                        {else}
                        <input type="hidden" name="data[advurl]" value="{$data['advurl']}" />
                        <div class='form-control-static'>{$data['advurl']}</div>
                        {/if}
                    </div>
                </div>
                  <div class="form-group"></div>
            <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                           {ifp 'sysset.category.edit'}
                            <input type="submit" value="提交" class="btn btn-primary"  />
                            
                          {/if}
                     </div>
            </div>
  
    </form>
 
{template '_footer'}     